package com.zyj.myapplication.Service;

import com.zyj.myapplication.Javabean.OrderInfo;
import com.zyj.myapplication.Javabean.User;
import com.zyj.myapplication.Javabean.UserCollect;
import com.zyj.myapplication.Javabean.UserInfo;
import com.zyj.myapplication.Javabean.UserOrder;
import com.zyj.myapplication.Javabean.UserShaitu;
import com.zyj.myapplication.Javabean.YueJian;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/9/29.
 */

public interface UserService {
    //登录
    @GET("login")
    Call<User> getLogin(
            @Query("tel") String tel,
            @Query("password") String pwd
    );

    //注册
    @GET("reg")
    Call<User> getRegister(
            @Query("tel") String tel,
            @Query("password") String pwd
    );

    //关于约健体育
    @GET("getyuejian/SessionID/060pn7sjorpnq5fp53kid5st54")
    Call<YueJian> getYueJian();


    //个人中心获取信息
    @GET("getmine/SessionID/{SessionID}/userid/{userid}")
    Call<User> getuserinfo(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid
    );

    //修改头像
    @GET("fuserphoto/SessionID/{SessionID}/userid/{userid}")
    Call<User> updatephoto(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid
    );

    //修改昵称
    @GET("updatename/SessionID/{SessionID}/userid/{userid}/user_name/{user_name}")
    Call<UserInfo> updatename(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid,
            @Path("user_name") String username
    );

    //修改密码
    @GET("updatepass/SessionID/{SessionID}/userid/{userid}/password/{password}")
    Call<Integer> updatepwd(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid,
            @Path("password") String password
    );

    //获取晒图列表
    @GET("lists/mod/{mod}/SessionID/{SessionID}/userid/{userid}")
    Call<List<UserShaitu>> getusershaitu(
            @Path("mod") String mod,
            @Path("SessionID") String SessionID,
            @Path("userid") int userid

    );

    //获取关注列表
    @GET("lists/mod/{mod}/SessionID/{SessionID}/userid/{userid}")
    Call<List<UserCollect>> getcollect(
            @Path("mod") String mod,
            @Path("SessionID") String SessionID,
            @Path("userid") int userid

    );

    //获取全部订单列表
    @GET("lists/mod/{mod}/listorder/update_time/userid/{userid}/SessionID/{SessionID}")
    Call<List<UserOrder>> getallorder(
            @Path("mod") String mod,
            @Path("userid") int userid,
            @Path("SessionID") String SessionID
    );

    //获取已完成或者未参加订单
    @GET("lists/mod/{mod}/listorder/update_time/userid/{userid}/vstate/{vstate}/SessionID/{SessionID}")
    Call<List<UserOrder>> getordertype(
            @Path("mod") String mod,
            @Path("userid") int userid,
            @Path("vstate") int vstate,
            @Path("SessionID") String SessionID
    );

    //获取培训订单详情
    @GET("getDOrder/id/{id}/type/{type}/SessionID/{SessionID}")
    Call<OrderInfo> getOrder(
            @Path("id") String id,
            @Path("type") String type,
            @Path("SessionID") String SessionID
    );

    //获取大师关注状态
    @GET("isExits/mod/fans/fan_id/{fan_id}/userid/{userid}/fans_type/{fans_type}/SessionID/{SessionID}")
    Call<Integer> getTeaState(
            @Path("fan_id") String fan_id,
            @Path("userid") int userid,
            @Path("fans_type") String fans_type,
            @Path("SessionID") String SessionID
    );
    //关注大师
    @GET("focus/SessionID/{SessionID}/userid/{userid}/fan_id/{fan_id}/fans_type/{fans_type}")
    Call<Integer> changeTeaState(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid,
            @Path("fan_id") String fan_id,
            @Path("fans_type") String fans_type
    );
}
